Package com.cisco.pt.ipc.sim
Interface PortSecurity
- All Known Implementing Classes:
PortSecurityImpl
Information provided by the PKI file:
\class PortSecurity
\brief PortSecurity handles and manipulates port security on switch ports.
\example network().getDevice("Switch0").getPort("FastEthernet0/1").getPortSecurity()
- Author:
- Auto-generated
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddSecureMacEntry(MACAddress macAddress, boolean isSticky) Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:getPort()Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanremoveSecureMacEntry(MACAddress macAddress) Information provided by the PKI file:booleansecureMacExist(MACAddress macAddress) Information provided by the PKI file:voidsetEnabled(boolean bEnable) Information provided by the PKI file:booleansetMaxMacNumber(int max) Information provided by the PKI file:voidsetStickyflag(boolean isSticky) Information provided by the PKI file:voidInformation provided by the PKI file:Methods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Method Details
-
isEnabled
boolean isEnabled()Information provided by the PKI file:
\brief Returns true if port security is enabled, otherwise false. \return bool, true if port security is enabled, otherwise false.- Returns:
- boolean Returns a boolean
-
setEnabled
void setEnabled(boolean bEnable) Information provided by the PKI file:
\brief Enables or disables port security. \param bEnable, true to enable port security, false to disable it.- Parameters:
bEnable- Takes in a parameter of bEnable
-
setMaxMacNumber
boolean setMaxMacNumber(int max) Information provided by the PKI file:
\brief Sets the port security max-mac-count. \param max, the port security max-mac-count value. \return bool, true if successful, otherwise false.- Parameters:
max- Takes in a parameter of max- Returns:
- boolean Returns a boolean
-
getMaxMacNumber
int getMaxMacNumber()Information provided by the PKI file:
\brief Returns the port security max-mac-count. \return int, the port security max-mac-count value.- Returns:
- int Returns a int
-
getTotalMac
int getTotalMac()Information provided by the PKI file:
\brief Returns the total number of MAC addresses. \return int, the total number of MAC addresses.- Returns:
- int Returns a int
-
getViolationCount
int getViolationCount()Information provided by the PKI file:
\brief Returns the number of violations. \return int, the number of violations.- Returns:
- int Returns a int
-
getLastSourceMacVlan
Pair<MACAddress,Integer> getLastSourceMacVlan()Information provided by the PKI file:
\brief Returns the last source MAC address and VLAN number. \return pair<mac, int>, the last source MAC address and VLAN number.- Returns:
- Pair<MACAddress, Integer> Returns a Pair<MACAddress, Integer>
-
setViolationMode
Information provided by the PKI file:
\brief Sets the violation mode. \param type, the violation mode. Violation modes: eShutdown = 0, eProtect = 1, eRestrict = 2- Parameters:
type- Takes in a parameter of type
-
addSecureMacEntry
Information provided by the PKI file:
\brief Adds a secure MAC address entry. \param macAddress, the MAC address to add. \param isSticky, true for sticky, false for not sticky. \return bool, true if successful, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddressisSticky- Takes in a parameter of isSticky- Returns:
- boolean Returns a boolean
-
removeSecureMacEntry
Information provided by the PKI file:
\brief Removes the specified secure MAC address entry. \param macAddress, the MAC address to remove. \return bool, true if successful, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddress- Returns:
- boolean Returns a boolean
-
getSecureMacCount
int getSecureMacCount()Information provided by the PKI file:
\brief Returns the number of secure MAC addresses. \return int, the number of secure MAC addresses.- Returns:
- int Returns a int
-
secureMacExist
Information provided by the PKI file:
\brief Returns true if the specified secure MAC address exists, otherwise false. \param macAddress, the MAC address of interest. \return bool, true if the specified secure MAC address exists, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddress- Returns:
- boolean Returns a boolean
-
getPort
Port getPort()Information provided by the PKI file:
\brief Returns the switch port. \return Port, the Port object.- Returns:
- Port Returns a Port
-
isStickyOn
boolean isStickyOn()Information provided by the PKI file:
\brief Returns true if sticky is enabled, otherwise false. \return bool, true if sticky is enabled, otherwise false.- Returns:
- boolean Returns a boolean
-
setStickyflag
void setStickyflag(boolean isSticky) Information provided by the PKI file:
\brief Enables or disables sticky. \param isSticky, true to enable sticky, false to disable it.- Parameters:
isSticky- Takes in a parameter of isSticky
-